import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '公司名称',
    align: "center",
    dataIndex: 'name'
  },
  {
    title: '公司地址',
    align: "center",
    dataIndex: 'address'
  },
  {
    title: 'LOGO',
    align: "center",
    dataIndex: 'logo',
    customRender: render.renderImage,
  },
  {
    title: '官方网址',
    align: "center",
    dataIndex: 'website'
  },
  {
    title: '客服电话',
    align: "center",
    dataIndex: 'servicePhone'
  },
  {
    title: '微信号码',
    align: "center",
    dataIndex: 'wechatNumber'
  },
  {
    title: 'QQ号码',
    align: "center",
    dataIndex: 'qqNumber'
  },
  {
    title: '邮箱地址',
    align: "center",
    dataIndex: 'email'
  },
  {
    title: '启用状态',
    align: "center",
    dataIndex: 'status_dictText'
  },
  {
    title: 'tenantId',
    align: "center",
    dataIndex: 'tenantId'
  },
];

//查询数据
export const searchFormSchema: FormSchema[] = [
];

//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '公司名称',
    field: 'name',
    component: 'Input',
  },
  {
    label: '公司地址',
    field: 'address',
    component: 'Input',
  },
  {
    label: 'LOGO',
    field: 'logo',
    component: 'JImageUpload',
    componentProps:{
    },
  },
  {
    label: '官方网址',
    field: 'website',
    component: 'Input',
  },
  {
    label: '客服电话',
    field: 'servicePhone',
    component: 'Input',
  },
  {
    label: '微信号码',
    field: 'wechatNumber',
    component: 'Input',
  },
  {
    label: 'QQ号码',
    field: 'qqNumber',
    component: 'Input',
  },
  {
    label: '邮箱地址',
    field: 'email',
    component: 'Input',
  },
  {
    label: '启用状态',
    field: 'status',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "status"
    },
  },
  {
    label: 'tenantId',
    field: 'tenantId',
    component: 'InputNumber',
  },
	// TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];
